Tagged union
DATA STRUCTURE USED TO HOLD A VALUE THAT COULD TAKE ON SEVERAL DIFFERENT, BUT FIXED, TYPES
Variant record; United modes; Sum type; Either type; Variant type
In computer science, a tagged union, also called a variant, variant record, choice type, discriminated union, disjoint union, sum type or coproduct, is a data structure used to hold a value that could take on several different, but fixed, types. Only one of the types can be in use at any one time, and a tag field explicitly indicates which one is in use.